package cn.topcodes.tcsf.admin.domain.entity;

import cn.topcode.unicorn.utils.I18n;
import cn.topcodes.tcsf.admin.commons.domain.IdEntity;
import cn.topcodes.tcsf.admin.commons.generic.OperateLogConfig;
import lombok.Data;
import lombok.ToString;
import javax.persistence.Column;
import javax.persistence.Table;
import java.util.Date;

/**
 * 系统用户
 * @author unicorn
 */
@Data
@ToString(callSuper = true)
@OperateLogConfig(name = "系统用户")
@Table(name = "t_sys_user")
public class SysUser extends IdEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 用户名
     */
    private String username;

    /**
     * 密码
     */
    private String password;

    /**
     * 盐
     */
    private String salt;

    /**
     * 电话
     */
    private String tel;

    /**
     * 邮箱
     */
    private String email;

    /**
     * 所属部门
     */
    @Column(name = "dept_id")
    private Long deptId;

    /**
     * 注册时间
     */
    @Column(name = "register_time")
    private Date registerTime;

    /**
     * 注册ip
     */
    @Column(name = "register_ip")
    private String registerIp;

    /**
     * 最后登录时间
     */
    @Column(name = "last_login_time")
    private Date lastLoginTime;

    /**
     * 最后登录ip
     */
    @Column(name = "last_login_ip")
    private String lastLoginIp;

    /**
     * 真实姓名
     */
    @Column(name = "real_name")
    private String realName;

    /**
     * 描述
     */
    private String description;

    /**
     * 性别
     */
    @I18n(module = "commons",domain = "Person")
    private String gender;

}